﻿using ZSoft.Telegram.DataAccess.Abstraction;
using ZSoft.Telegram.DataAccess.Abstractions;
using Microsoft.AspNet.Identity;
using ZSoft.Telegram.Services.Abstraction;
using System.Web.Mvc;
using System.Text;

namespace ZSoft.Telegram.UI.Web.Infrastructure.AppEvents.BaseControllers
{
    public abstract class EntityController<T> : BaseController where T : class, IEntity
    {
        protected IRepository<T> Repository { get; set; }
        protected abstract IEntityService<T> Service { get; }

        public static TService GetService<TService>()
        {
            return DependencyResolver.Current.GetService<TService>();
        }
        
    }
}